@echo off
REM ===============================================
REM   Copy from yubo<www.lifesinger.org> 
REM ===============================================

SETLOCAL ENABLEEXTENSIONS

echo.
echo Html Format...
echo.

for %%i in (.html .htm .shtml) do (if %%i==%~x1 goto FILE)

for %%i in (.html .htm .shtml) do (
	dir %~f1 | find /i "%%i" > nul
	if not errorlevel 1 goto FILE
)
echo " **** No html file found!"
goto END

:FILE
copy /y "%~f1" "%~n1-tmp%~x1" > nul
"%~dp0\html_parser.py" "%~n1-tmp%~x1" "%~n1-order%~x1"
del /q "%~n1-tmp%~x1"

:END
ENDLOCAL
echo.
pause
